package org.example.model.pay.enums;

import lombok.Getter;

@Getter
public enum PayStatus {
    //订单的状态，1、未付款 2、已付款 3、交易取消，订单关闭 4、已退款
    WAIT_BUYER_PAY(1, "待支付"),
    TRADE_SUCCESS(2, "已支付"),
    TRADE_CLOSED(3, "交易取消，支付失败"),
    REFUNDING(4, "退款成功"),
    ;
    private final int value;
    private final String desc;

    PayStatus(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public boolean equalsValue(Integer value){
        if (value == null) {
            return false;
        }
        return getValue() == value;
    }
}